<%-- 
    Document   : quotation_main
    Created on : Jan 7, 2009, 1:47:57 PM
    Author     : hp02
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<h3>Quotation</h3>
<table>
    <tr>
        <td class="menucon">
            <html:link action="/quotation_getspdcf.do">New Quotation</html:link>
        </td>
        <td class="menucon">
            <html:link action="/">Find by Status</html:link>
        </td>
        <td class="menucon">
            <html:link action="/">Find by Branch Office &amp; Status</html:link>
        </td>
        <td class="menucon">
            <html:link action="/">Find by Sales &amp; Status</html:link>
        </td>
    </tr>
</table>
<html:messages id="messages" property="customMessage" message="true">
    <div><bean:write name="messages"/></div>
</html:messages>
<html:errors/>
<html:messages id="messages" property="message" message="true">
    <ul>
        <li><bean:write name="messages"/></li>
    </ul>
</html:messages>
<table>
    <tr class="table_header">
        <th>No.</th>
        <th>Quot. Number</th>
        <th>Created</th>
        <th>Status</th>
        <th>Revision</th>
        <th>Sales</th>
        <th>Branch Office</th>
        <th>Actions</th>
    </tr>
    <c:set var="x" value="0"/>
    <c:forEach items="${quotations}" var="quotation">
        <tr>
            <td>${x+1}.</td>
            <td>${quotation.spdcf.inquery.noQuotation}</td>
            <td><f:formatDate type="date" value="${quotation.tglQuotation}"/></td>
            <td>
                <c:if test="${quotation.status==0}">
                    <img src="page/images/iconset/tender.png" alt="" title="Tender" align="absmiddle">Tender
                </c:if>
                <c:if test="${quotation.status==1}">
                    <img src="page/images/iconset/win.png" alt="" title="Tender" align="absmiddle">Win
                </c:if>
                <c:if test="${quotation.status==2}">
                    <img src="page/images/iconset/lose.png" alt="" title="Tender" align="absmiddle">Lose
                </c:if>
            </td>
            <td>R${quotation.revise}</td>
            <td>${quotation.spdcf.inquery.sales.nama}</td>
            <td>${quotation.spdcf.inquery.cabang.kota}</td>
            <td>
                <html:link action="/quotation_getdetail.do?id=${quotation.id}">Detail</html:link>
                <html:link action="/quotation_update.do?step=update&id=${quotation.id}">Edit</html:link>
                <html:link action="/quotation_getquotation.do?id=${quotation.id}">Revise</html:link>
                <html:link action="/quotation_delete.do?id=${quotation.id}">Delete</html:link>
            </td>
        </tr>
        <c:set var="x" value="${x+1}"/>
    </c:forEach>
        <tr class="table_footer">
            <td colspan="10">PT. Dhemar Nusantara - PT. Rahmi Ida Nusantara</td>
        </tr>
</table>
